@if (!_isEditing) {
  <span class="mat-mdc-chip-focus-overlay"></span>
}

@if (_hasLeadingActionIcon()) {
  <span class="mdc-evolution-chip__cell mdc-evolution-chip__cell--leading" role="gridcell">
    <ng-content select="[matChipEdit]"></ng-content>
  </span>
}
<span class="mdc-evolution-chip__cell mdc-evolution-chip__cell--primary" role="gridcell"
    matChipAction
    [disabled]="disabled"
    [attr.aria-description]="ariaDescription"
    [attr.aria-label]="ariaLabel">
  @if (leadingIcon) {
    <span class="mdc-evolution-chip__graphic mat-mdc-chip-graphic">
      <ng-content select="mat-chip-avatar, [matChipAvatar]"></ng-content>
    </span>
  }

  <span class="mdc-evolution-chip__text-label mat-mdc-chip-action-label">
    @if (_isEditing) {
      @if (contentEditInput) {
        <ng-content select="[matChipEditInput]"></ng-content>
      } @else {
        <span matChipEditInput></span>
      }
    } @else {
      <ng-content></ng-content>
    }

    <span class="mat-mdc-chip-primary-focus-indicator mat-focus-indicator" aria-hidden="true"></span>
  </span>
</span>

@if (_hasTrailingIcon()) {
  <span
    class="mdc-evolution-chip__cell mdc-evolution-chip__cell--trailing"
    role="gridcell">
    <ng-content select="mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"></ng-content>
  </span>
}
